home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsISOAPMessage.idl < prev    next >
Text File  |  2006-05-08  |  9KB  |  231 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 2001
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsISupports.idl"
  39.  
  40. interface nsIDOMDocument;
  41. interface nsIDOMElement;
  42. interface nsISOAPEncoding;
  43. interface nsISOAPHeaderBlock;
  44. interface nsISOAPParameter;
  45. interface nsIVariant;
  46.  
  47. /**
  48.  * This interface controls all SOAP messages. It permits easy
  49.  * construction of a message, typically through encoding of
  50.  * parameters and certain properties settable on this interface
  51.  * or through deserialization of a transport stream.  It
  52.  * permits easy processing of a message typically through
  53.  * decoding of parameters and certain properties available
  54.  * on this interface.  It also encapsulates protocol information
  55.  * interpreted by the transport.
  56.  */
  57.  
  58. [scriptable, uuid(3970815e-1dd2-11b2-a475-db4dac6826f1)]
  59. interface nsISOAPMessage : nsISupports {
  60.  
  61.   const unsigned short VERSION_1_1 = 0;
  62.   const unsigned short VERSION_1_2 = 1;
  63.   const unsigned short VERSION_UNKNOWN = 0xFFFF;
  64.  
  65.   /**
  66.    * The document which captures the message, if any.  A simple 
  67.    * sending application passes parameters to the method
  68.    * encodeSOAPParameters, which calls SOAP encoders 
  69.    * to construct this document along with all contained elements.  
  70.    *
  71.    * But an application may create and set the message directly
  72.    * instead of invoking encodeSOAPParameters to use encoders
  73.    * or access and manipulate the message after it has been 
  74.    * constructed by encodeSOAPParameters.  If the message has 
  75.    * not been set, invoking a call will fail.  A message reciever 
  76.    * may also use this accessor to get the document to avoid using 
  77.    * decoders.
  78.    */
  79.   attribute nsIDOMDocument message;
  80.  
  81.   /**
  82.    * A convenience attribute to obtain the DOM element representing the
  83.    * SOAP envelope from the document.  DOM methods may be used to 
  84.    * access, add, or modify attributes of the envelope.
  85.    *
  86.    * If the message attribute is null or is not a document containing
  87.    * a root soap envelope element, then this will be null.
  88.    */
  89.   readonly attribute nsIDOMElement envelope;
  90.  
  91.   /**
  92.    * A convenience attribute to obtain the SOAP version number, if
  93.    * it is known, from the envelope.
  94.    *
  95.    * If the message attribute is null or is not a document containing
  96.    * a root soap envelope element, then this will be VERSION_UNKNOWN.
  97.    */
  98.   readonly attribute unsigned short version;
  99.  
  100.   /**
  101.    * A convenience attribute to obtain the DOM element representing the
  102.    * SOAP header from the envelope.  DOM methods may be used to 
  103.    * access, add, or modify attributes or elements of the header.
  104.    *
  105.    * If the envelope attribute is null or does not contain a SOAP header
  106.    * element type, then this will be null.
  107.    */
  108.   readonly attribute nsIDOMElement header;
  109.  
  110.   /**
  111.    * A convenience attribute to obtain the DOM element representing the
  112.    * SOAP body from the envelope.  DOM methods may be used to 
  113.    * access, add, or modify attributes or elements of the body.
  114.    *
  115.    * If the envelope attribute is null or does not contain a SOAP body
  116.    * element type, then this will be null.
  117.    */
  118.   readonly attribute nsIDOMElement body;
  119.  
  120.   /**
  121.    * The name of the method being invoked. The methodName is set
  122.    * during encoding as the tagname of the single child of body
  123.    * of RPC-style messages.  When there is no encoded message
  124.    * this will be null.  The value of this attribute for
  125.    * document-style messages may be non-null but should be
  126.    * ignored.  It is up to the application to know whether the
  127.    * message is RPC-style or document style because the SOAP
  128.    * specification makes it difficult to tell which way a
  129.    * message was encoded.
  130.    */
  131.   readonly attribute AString methodName;
  132.  
  133.   /**
  134.    * The target object on which the method is being invoked. This URI
  135.    * is set during encoding as the namespace to qualify the tagname 
  136.    * of the single child of body of RPC-style messages.  When there
  137.    * is no encoded message, this will be null.  The value of this
  138.    * attribute for document-style messages may be non-null but should
  139.    * be ignored.  It is up to the application to know whether the
  140.    * message is RPC-style or document style because the SOAP
  141.    * specification makes it difficult to tell which way a
  142.    * message was encoded.
  143.    */
  144.   readonly attribute AString targetObjectURI;
  145.  
  146.   /**
  147.    * Encodes the specified parameters into this message, if
  148.    * this message type supports it.
  149.    *
  150.    * @param aMethodName The name of the method being invoked
  151.    * for rpc-style messages.  For document-style messages,
  152.    * this must be null.
  153.    *
  154.    * @param aTargetObjectURI The name of the target object
  155.    * for rpc-style messages.  For document-style messages,
  156.    * this must be null.
  157.    *
  158.    * @param aHeaderBlockCount Number of header blocks in array to be
  159.    *   encoded.  Must be 0 if header block array is null.
  160.    *
  161.    * @param aHeaderBlocks Array of header blocks to be encoded, which
  162.    *   may be null if there are no header blocks.
  163.    *
  164.    * @param aParameterCount Number of parameters in array 
  165.    *   to be encoded.  Must be 0 if parameter array is null.
  166.    *
  167.    * @param aParameters An array of parameters to be 
  168.    *   encoded, which may null if there are no parameters.
  169.    */
  170.   void encode(in unsigned short aVersion,
  171.               in AString aMethodName, in AString aTargetObjectURI,
  172.               in unsigned long aHeaderBlockCount,
  173.               [array,
  174.                size_is(aHeaderBlockCount)] in nsISOAPHeaderBlock
  175.               aHeaderBlocks, in unsigned long aParameterCount,[array,
  176.                                                           size_is
  177.                                                           (aParameterCount)]
  178.               in nsISOAPParameter aParameters);
  179.  
  180.   /**
  181.    * Gathers the header blocks of a message so that they can be
  182.    *   accessed by a recipient.
  183.    *
  184.    * @param aCount Integer to receive the length of the list
  185.    *   of header blocks.
  186.    *
  187.    * @return Array of header blocks found in the message.
  188.    */
  189.   void getHeaderBlocks(out unsigned long aCount,
  190.                        [array, size_is(aCount),
  191.                         retval] out nsISOAPHeaderBlock aHeaderBlocks);
  192.  
  193.   /**
  194.    * Gathers the parameters of a message so that they can be
  195.    *   accessed by a recipient.
  196.    *
  197.    * @param aDocumentStyle If true, then the parameters
  198.    *   are looked for treating the message as a document 
  199.    *   style message, otherwise it treated as an RPC-style 
  200.    *   message.
  201.    *
  202.    * @param aCount Integer to receive the length of the list
  203.    *   of parameters.
  204.    *
  205.    * @return Array of parameters found in the message.
  206.    */
  207.   void getParameters(in boolean aDocumentStyle,
  208.                      out unsigned long aCount,
  209.                      [array, size_is(aCount),
  210.                      retval] out nsISOAPParameter aParameters);
  211.  
  212.   /**
  213.    * The primary encoding of the message, which is established
  214.    *   at the envelope and used unless overridden.  By default,
  215.    *   this is the SOAP encoding, which may be locally modified
  216.    *   or used to obtain alternative encodings, which may be
  217.    *   locally modified, but it may be set to an encoding that
  218.    *   is shared, or it may be set to null, in which case all
  219.    *   non-literal header blocks and parameters must specify an
  220.    *   encoding.
  221.    */
  222.   attribute nsISOAPEncoding encoding;
  223.  
  224.   /**
  225.    * An optional URI that can be used to add a SOAPAction HTTP
  226.    * header field. If this attribute is NULL (the default case),
  227.    * no SOAPAction header will be added.
  228.    */
  229.   attribute AString actionURI;
  230. };
  231.